package com.han.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.han.core.domain.bo.ProductPageBO;
import com.han.core.domain.dto.QueryProductPageDTO;
import com.han.core.domain.entity.Product;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;
import java.util.Set;

/**
 * @author Administrator
 * @description 针对表【product】的数据库操作Mapper
 * @createDate 2024-06-19 10:23:21
 * @Entity com.han.core.domin.entity.Product
 */
@Mapper
public interface ProductMapper extends BaseMapper<Product> {

    @Select("select product_id from product where shop_id = #{id}")
    Set<Long> selectProductIds(@Param("id") Long shopId);

    List<ProductPageBO> PageByQuery(@Param("param") QueryProductPageDTO queryProductDTO);


    Integer getPageTotal(@Param("param") QueryProductPageDTO queryProductDTO);
}




